FIND_PATH(AVOGADRO_INCLUDE_DIR NAMES avogadro/glwidget.h 
     PATHS
     ${CMAKE_INSTALL_PREFIX}/include
	/usr/include
	/usr/local/include
	/usr/include/avogadro 
	/usr/local/include/avogadro
)

FIND_LIBRARY(AVOGADRO_LIBRARY 
	NAMES 
		avogadro 
	PATH 
		${CMAKE_INSTALL_PREFIX}/lib
		/usr/lib 
		/usr/local/lib
) 

IF (AVOGADRO_LIBRARY AND AVOGADRO_INCLUDE_DIR)
	SET(AVOGADRO_LIBRARIES ${AVOGADRO_LIBRARY})
	SET(AVOGADRO_FOUND TRUE)
ENDIF (AVOGADRO_LIBRARY AND AVOGADRO_INCLUDE_DIR)


IF (AVOGADRO_FOUND)
	IF (NOT AVOGADRO_FIND_QUIETLY)
		MESSAGE(STATUS "Found libavogadro: ${AVOGADRO_LIBRARY}")
	ENDIF (NOT AVOGADRO_FIND_QUIETLY)
ELSE (AVOGADRO_FOUND)
	IF (AVOGADRO_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "Could not find libavogadro")
	ENDIF (AVOGADRO_FIND_REQUIRED)
ENDIF (AVOGADRO_FOUND)
